//
//  CommentViewController.m
//  XiangMuB
//
//  Created by lanou3g on 16/8/13.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "CommentViewController.h"

#import "PersonMessageTableViewCell.h"

@interface CommentViewController ()

@property (strong, nonatomic) NSMutableArray *dataArray;

@end

@implementation CommentViewController

- (NSMutableArray *)dataArray{
    
    if (_dataArray == nil) {
        _dataArray = [NSMutableArray array];
    }
    
    return _dataArray;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor darkGrayColor];
    self.navigationItem.title = @"详情";
    
    
}




#pragma mark UITableViewDatasource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString *identifierCell = @"cell";
    
    UITableViewCell *cell = nil;
    
    if (indexPath.row == 0) {
        
        cell = [[PersonMessageTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifierCell];
        cell.contentView.backgroundColor = [UIColor lightGrayColor];
        
    } else {
        
        cell = [tableView dequeueReusableCellWithIdentifier:identifierCell];
        
        if (cell == nil) {
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifierCell];
            
        }
        
        cell.contentView.backgroundColor = [UIColor orangeColor];
        
    }
    
   
    
    
    return cell;
    
}

#pragma mark UITableViewDelegate

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (indexPath.row == 0) {
        return 400;
    } else {
        
        return 50;
    }
    
   
}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
